#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
    double x1,y1,x2,y2,x3,y3,x4,y4,d1,d2;
    int i;
    while(scanf("%lf",&x1)!=EOF)
    {
        scanf("%lf %lf %lf %lf %lf %lf %lf",&y1,&x2,&y2,&x3,&y3,&x4,&y4);
        d1=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))+sqrt((x4-x2)*(x4-x2)+(y4-y2)*(y4-y2));
        d2=sqrt(pow(x1-x3,2)+pow(y1-y3,2))+sqrt(pow(x4-x3,2)+pow(y4-y3,2));
        if(d1>d2)
        {
            printf("ACD\n");
        }
        else
        {
            printf("ABD\n");
        }
    }
    return 0;
}
